package tr.com.netgis;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;


public class FileLogActivity extends Activity {
	
	private EditText txtFileLog;
	private Button btnTemizle;
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.filelog);
		txtFileLog = (EditText) findViewById(R.id.txtFileLog);
		btnTemizle = (Button) findViewById(R.id.btnTemizle);
		final Context ctx = this;
		btnTemizle.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				FileLogger.clearLogContent(ctx);
				txtFileLog.setText("");
			}
		});
	}

	@Override
	protected void onResume() {
		super.onResume();
		txtFileLog.setText(FileLogger.readLogContent(this));
	}
}
